
import RandomUtil from '../../engine/RandomUtil';
import VersionManager from '../../engine/VersionManager';
import ViewBase from '../../engine/ViewBase';
import { WechatSdkManager } from '../../sdk/WechatSdkManager';
import { UIHelper } from '../util/UIHelper';

const { ccclass, property } = cc._decorator;


@ccclass
export default class ViewShare extends ViewBase {

    onEnable(): void {
        super.onEnable()
        let btnPengyouquan: cc.Node = this.findChild(this.node, "btnPengyouquan")
        UIHelper.onAddEvent(btnPengyouquan, () => {
            WechatSdkManager.share_url("金鸡竞技", "仁怀本土麻将游戏，地道本土玩法.，庄必乘、本本鸡+见七挖、约局就在仁怀麻将！！", 1, VersionManager.instance.apkStoreUrl)
     
        })
        let btnhaoyou: cc.Node = this.findChild(this.node, "btnhaoyou")
        UIHelper.onAddEvent(btnhaoyou, () => {
            WechatSdkManager.share_url("金鸡竞技", "仁怀本土麻将游戏，地道本土玩法.，庄必乘、本本鸡+见七挖、约局就在仁怀麻将！！", 0, VersionManager.instance.apkStoreUrl)
        })
    }

}
